#include <stdio.h>
#include <string.h>
#include <unistd.h>

#include "cmsis_os2.h"
#include "iot_errno.h"
#include "ohos_init.h"
#include "app_log.h"
#include "app_mpu6050.h"
#include "mpu6050.h"

static char *TAG = "app_mpu6050.c";

/**
 * @brief mpu6050_test_task
*/
void mpu6050_test_task(void)
{
    MY_LOGI(TAG,"Start Device Init!\r\n");
    /* init start */
    uint8_t ret;
    MPU6050Data data;
    int X = 0, Y = 0, Z = 0;
    /* MPU6050模块初始化 */
    ManholeInit();
    /* init start */
    MY_LOGI(TAG,"Start Run app_task\r\n");
    while (1)
    {
        ManholeReadData(&data);
        printf("X:%hd Y:%hd Z:%hd Temp:%hd\n",data.Accel[0],data.Accel[1],data.Accel[2],data.Temperature);
        OsDelay(300);
    }
}